<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>wickr-crypto-c: src/wickrcrypto/include/wickrcrypto/transport_ctx.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">wickr-crypto-c
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_92a70b6cc7e213c660915fdf1190028f.html">wickrcrypto</a></li><li class="navelem"><a class="el" href="dir_db4377ef08cfba82f5e7141624102360.html">include</a></li><li class="navelem"><a class="el" href="dir_2adb4122f2f58e588d09641dee9865e2.html">wickrcrypto</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">transport_ctx.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Copyright © 2012-2018 Wickr Inc.  All rights reserved.</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * This code is being released for EDUCATIONAL, ACADEMIC, AND CODE REVIEW PURPOSES</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * ONLY.  COMMERCIAL USE OF THE CODE IS EXPRESSLY PROHIBITED.  For additional details,</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * please see LICENSE</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * THE CODE IS MADE AVAILABLE &quot;AS-IS&quot; AND WITHOUT ANY EXPRESS OR</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * IMPLIED GUARANTEES AS TO FITNESS, MERCHANTABILITY, NON-</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * INFRINGEMENT OR OTHERWISE. IT IS NOT BEING PROVIDED IN TRADE BUT ON</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * A VOLUNTARY BASIS ON BEHALF OF THE AUTHOR’S PART FOR THE BENEFIT</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> * OF THE LICENSEE AND IS NOT MADE AVAILABLE FOR CONSUMER USE OR ANY</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> * OTHER USE OUTSIDE THE TERMS OF THIS LICENSE. ANYONE ACCESSING THE</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> * CODE SHOULD HAVE THE REQUISITE EXPERTISE TO SECURE THEIR SYSTEM</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> * AND DEVICES AND TO ACCESS AND USE THE CODE FOR REVIEW PURPOSES</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> * ONLY. LICENSEE BEARS THE RISK OF ACCESSING AND USING THE CODE. IN</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> * PARTICULAR, AUTHOR BEARS NO LIABILITY FOR ANY INTERFERENCE WITH OR</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> * ADVERSE EFFECT THAT MAY OCCUR AS A RESULT OF THE LICENSEE</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> * ACCESSING AND/OR USING THE CODE ON LICENSEE’S SYSTEM.</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="preprocessor">#ifndef transport_h</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#define transport_h</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#include &quot;crypto_engine.h&quot;</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#include &quot;node.h&quot;</span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#include &quot;stream_ctx.h&quot;</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<span class="keyword">struct </span><a class="code" href="structwickr__transport__ctx.html">wickr_transport_ctx</a>;</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structwickr__transport__ctx.html">wickr_transport_ctx</a> <a class="code" href="structwickr__transport__ctx.html">wickr_transport_ctx_t</a>;</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span> {</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    TRANSPORT_STATUS_NONE, <span class="comment">/* Transport has not been initialized */</span></div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    TRANSPORT_STATUS_SEEDED, <span class="comment">/* Transport has generated and sent a seed handshake packet */</span></div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    TRANSPORT_STATUS_TX_INIT, <span class="comment">/* Transport has processed an incoming seed handshake packet and responded */</span></div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    TRANSPORT_STATUS_ACTIVE, <span class="comment">/* Transport has both rx and tx streams initialized and is able to send encrypted packets */</span></div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    TRANSPORT_STATUS_ERROR <span class="comment">/* Transport has encountered an error, and communication is no longer possible */</span></div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;} wickr_transport_status;</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span> {</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    TRANSPORT_DATA_FLOW_BIDIRECTIONAL, <span class="comment">/* Data flow can happen in both directions */</span></div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    TRANSPORT_DATA_FLOW_READ_ONLY, <span class="comment">/* Non handshake packets can only flow in the rx direction */</span></div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    TRANSPORT_DATA_FLOW_WRITE_ONLY <span class="comment">/* Non handshake packets can only flow in the tx direction */</span></div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;} wickr_transport_data_flow;</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span> {</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    TRANSPORT_PAYLOAD_TYPE_HANDSHAKE, <span class="comment">/* Payload is a handshake control packet */</span></div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    TRANSPORT_PAYLOAD_TYPE_CIPHERTEXT <span class="comment">/* Payload contains encrypted application data */</span></div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;} wickr_transport_payload_type;</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;<span class="comment">/* Function callback to handle sending / receiving / errors via an actual transport, eg socket */</span></div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;<span class="keyword">typedef</span> void (*wickr_transport_tx_func)(<span class="keyword">const</span> <a class="code" href="structwickr__transport__ctx.html">wickr_transport_ctx_t</a> *ctx, <span class="keyword">const</span> <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *data, wickr_transport_payload_type pkt_type, <span class="keywordtype">void</span> *user);</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;<span class="keyword">typedef</span> void (*wickr_transport_rx_func)(<span class="keyword">const</span> <a class="code" href="structwickr__transport__ctx.html">wickr_transport_ctx_t</a> *ctx, <span class="keyword">const</span> <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *data, <span class="keywordtype">void</span> *user);</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;<span class="keyword">typedef</span> void (*wickr_transport_state_change_func)(<span class="keyword">const</span> <a class="code" href="structwickr__transport__ctx.html">wickr_transport_ctx_t</a> *ctx, wickr_transport_status status, <span class="keywordtype">void</span> *user);</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;<span class="keyword">typedef</span> bool (*wickr_transport_validate_identity_func)(<span class="keyword">const</span> <a class="code" href="structwickr__transport__ctx.html">wickr_transport_ctx_t</a> *ctx, <a class="code" href="structwickr__identity__chain.html">wickr_identity_chain_t</a> *identity, <span class="keywordtype">void</span> *user);</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;<span class="keyword">typedef</span> <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *(*wickr_transport_psk_func) (<span class="keyword">const</span> <a class="code" href="structwickr__transport__ctx.html">wickr_transport_ctx_t</a> *ctx, <span class="keywordtype">void</span> *user);</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;<span class="keyword">typedef</span> <a class="code" href="structwickr__stream__ctx.html">wickr_stream_ctx_t</a> *(*wickr_transport_tx_stream_func) (<span class="keyword">const</span> <a class="code" href="structwickr__transport__ctx.html">wickr_transport_ctx_t</a> *ctx, <a class="code" href="structwickr__stream__ctx.html">wickr_stream_ctx_t</a> *tx_stream, <span class="keywordtype">void</span> *user);</div><div class="line"><a name="l00098"></a><span class="lineno"><a class="line" href="structwickr__transport__callbacks.html">   98</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structwickr__transport__callbacks.html">wickr_transport_callbacks</a> {</div><div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="structwickr__transport__callbacks.html#a06c4b21b847c00e92373cf1402e1cb9d">   99</a></span>&#160;    wickr_transport_tx_func <a class="code" href="structwickr__transport__callbacks.html#a06c4b21b847c00e92373cf1402e1cb9d">tx</a>;</div><div class="line"><a name="l00100"></a><span class="lineno"><a class="line" href="structwickr__transport__callbacks.html#a5d523402980ac09fdf52aa4824f8e9f7">  100</a></span>&#160;    wickr_transport_rx_func <a class="code" href="structwickr__transport__callbacks.html#a5d523402980ac09fdf52aa4824f8e9f7">rx</a>;</div><div class="line"><a name="l00101"></a><span class="lineno"><a class="line" href="structwickr__transport__callbacks.html#afef0716506b88885c57fda652500b3da">  101</a></span>&#160;    wickr_transport_state_change_func <a class="code" href="structwickr__transport__callbacks.html#afef0716506b88885c57fda652500b3da">on_state</a>;</div><div class="line"><a name="l00102"></a><span class="lineno"><a class="line" href="structwickr__transport__callbacks.html#ab1afc16797b1bb30dde87936a97f682e">  102</a></span>&#160;    wickr_transport_validate_identity_func <a class="code" href="structwickr__transport__callbacks.html#ab1afc16797b1bb30dde87936a97f682e">on_identity_verify</a>;</div><div class="line"><a name="l00103"></a><span class="lineno"><a class="line" href="structwickr__transport__callbacks.html#af01227bfe19f056de55669d79ed7c120">  103</a></span>&#160;    wickr_transport_psk_func <a class="code" href="structwickr__transport__callbacks.html#af01227bfe19f056de55669d79ed7c120">on_psk_required</a>;</div><div class="line"><a name="l00104"></a><span class="lineno"><a class="line" href="structwickr__transport__callbacks.html#a1b6ee026d404a5b267e0c680dc9c2337">  104</a></span>&#160;    wickr_transport_tx_stream_func <a class="code" href="structwickr__transport__callbacks.html#a1b6ee026d404a5b267e0c680dc9c2337">on_tx_stream_gen</a>;</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;};</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structwickr__transport__callbacks.html">wickr_transport_callbacks</a> <a class="code" href="structwickr__transport__callbacks.html">wickr_transport_callbacks_t</a>;</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;<a class="code" href="structwickr__transport__ctx.html">wickr_transport_ctx_t</a> *<a class="code" href="group__wickr__transport__ctx.html#ga4731758cf20b71d4469c74904bf662c0">wickr_transport_ctx_create</a>(<span class="keyword">const</span> <a class="code" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a> engine,</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;                                                  <a class="code" href="structwickr__node.html">wickr_node_t</a> *local_identity,</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;                                                  <a class="code" href="structwickr__node.html">wickr_node_t</a> *remote_identity,</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;                                                  uint32_t evo_count,</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;                                                  <a class="code" href="structwickr__transport__callbacks.html">wickr_transport_callbacks_t</a> callbacks,</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;                                                  <span class="keywordtype">void</span> *user);</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;<a class="code" href="structwickr__transport__ctx.html">wickr_transport_ctx_t</a> *<a class="code" href="group__wickr__transport__ctx.html#gaa49b2cf44bcb02d656598a17e5ae1c52">wickr_transport_ctx_copy</a>(<span class="keyword">const</span> <a class="code" href="structwickr__transport__ctx.html">wickr_transport_ctx_t</a> *ctx);</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__wickr__transport__ctx.html#gabe547b01f4f02efea3f518d7445a71ee">wickr_transport_ctx_destroy</a>(<a class="code" href="structwickr__transport__ctx.html">wickr_transport_ctx_t</a> **ctx);</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__wickr__transport__ctx.html#gaee74761e31d5f0a6fc97e2ccf5ac1e29">wickr_transport_ctx_start</a>(<a class="code" href="structwickr__transport__ctx.html">wickr_transport_ctx_t</a> *ctx);</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;<a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *<a class="code" href="group__wickr__transport__ctx.html#ga60dad2360ba29d8c131093a4e9b69057">wickr_transport_ctx_process_tx_buffer</a>(<a class="code" href="structwickr__transport__ctx.html">wickr_transport_ctx_t</a> *ctx, <span class="keyword">const</span> <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *buffer);</div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;</div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;<a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *<a class="code" href="group__wickr__transport__ctx.html#gaa0af661e209143c19633e1244ac59db4">wickr_transport_ctx_process_rx_buffer</a>(<a class="code" href="structwickr__transport__ctx.html">wickr_transport_ctx_t</a> *ctx, <span class="keyword">const</span> <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *buffer);</div><div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;</div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;</div><div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;<span class="comment">/* GETTERS AND SETTERS */</span></div><div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;</div><div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;wickr_transport_status <a class="code" href="group__wickr__transport__ctx.html#ga3d3ffde9ec2f9f12ecb6999a048e2437">wickr_transport_ctx_get_status</a>(<span class="keyword">const</span> <a class="code" href="structwickr__transport__ctx.html">wickr_transport_ctx_t</a> *ctx);</div><div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;</div><div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;<span class="keyword">const</span> <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *<a class="code" href="group__wickr__transport__ctx.html#ga3ec320d2e4a4010ffa3f411c1ea1419a">wickr_transport_ctx_get_rxstream_user_data</a>(<span class="keyword">const</span> <a class="code" href="structwickr__transport__ctx.html">wickr_transport_ctx_t</a> *ctx);</div><div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;</div><div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;<span class="keyword">const</span> <a class="code" href="structwickr__node.html">wickr_node_t</a> *<a class="code" href="group__wickr__transport__ctx.html#ga7bcb60a2739744e08cce0c18ce7f01ba">wickr_transport_ctx_get_local_node_ptr</a>(<span class="keyword">const</span> <a class="code" href="structwickr__transport__ctx.html">wickr_transport_ctx_t</a> *ctx);</div><div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;</div><div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;<span class="keyword">const</span> <a class="code" href="structwickr__node.html">wickr_node_t</a> *<a class="code" href="group__wickr__transport__ctx.html#gad9baf62b25d23b9c6ecd5cec0fc9d6f5">wickr_transport_ctx_get_remote_node_ptr</a>(<span class="keyword">const</span> <a class="code" href="structwickr__transport__ctx.html">wickr_transport_ctx_t</a> *ctx);</div><div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;</div><div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;<span class="keyword">const</span> <span class="keywordtype">void</span> *<a class="code" href="group__wickr__transport__ctx.html#gaea14ff3de739f7bf4f85516fdefd1ea9">wickr_transport_ctx_get_user_ctx</a>(<span class="keyword">const</span> <a class="code" href="structwickr__transport__ctx.html">wickr_transport_ctx_t</a> *ctx);</div><div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;</div><div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__wickr__transport__ctx.html#gac1865750950d6ff5ba3850c5f03ab3c9">wickr_transport_ctx_set_user_ctx</a>(<a class="code" href="structwickr__transport__ctx.html">wickr_transport_ctx_t</a> *ctx, <span class="keywordtype">void</span> *user);</div><div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;</div><div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;<span class="keyword">const</span> <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *<a class="code" href="group__wickr__transport__ctx.html#gabd4c671c3f420e804dae16c662bc71c7">wickr_transport_ctx_get_user_psk</a>(<span class="keyword">const</span> <a class="code" href="structwickr__transport__ctx.html">wickr_transport_ctx_t</a> *ctx);</div><div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;</div><div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;wickr_transport_data_flow <a class="code" href="group__wickr__transport__ctx.html#gaffad367319e17f62046cde388ccd8802">wickr_transport_ctx_get_data_flow_mode</a>(<span class="keyword">const</span> <a class="code" href="structwickr__transport__ctx.html">wickr_transport_ctx_t</a> *ctx);</div><div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;</div><div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__wickr__transport__ctx.html#ga338125913ff273beec721b341de639a3">wickr_transport_ctx_set_data_flow_mode</a>(<a class="code" href="structwickr__transport__ctx.html">wickr_transport_ctx_t</a> *ctx , wickr_transport_data_flow flow_mode);</div><div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;</div><div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;<span class="keyword">const</span> <a class="code" href="structwickr__transport__callbacks.html">wickr_transport_callbacks_t</a> *<a class="code" href="group__wickr__transport__ctx.html#gafc6235ed4ee84ccbdfc3a0a0a617b557">wickr_transport_ctx_get_callbacks</a>(<span class="keyword">const</span> <a class="code" href="structwickr__transport__ctx.html">wickr_transport_ctx_t</a> *ctx);</div><div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;</div><div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__wickr__transport__ctx.html#ga9ed375c418ca58c30ca31c8303c71f92">wickr_transport_ctx_set_callbacks</a>(<a class="code" href="structwickr__transport__ctx.html">wickr_transport_ctx_t</a> *ctx, <span class="keyword">const</span> <a class="code" href="structwickr__transport__callbacks.html">wickr_transport_callbacks_t</a> *callbacks);</div><div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;</div><div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;<span class="keywordtype">bool</span> <a class="code" href="group__wickr__transport__ctx.html#ga177b8b150fe250cf04f8350be94af7fa">wickr_transport_ctx_force_tx_key_evo</a>(<a class="code" href="structwickr__transport__ctx.html">wickr_transport_ctx_t</a> *ctx);</div><div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160;    </div><div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;}</div><div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;</div><div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* transport_h */</span><span class="preprocessor"></span></div><div class="ttc" id="structwickr__transport__callbacks_html_a5d523402980ac09fdf52aa4824f8e9f7"><div class="ttname"><a href="structwickr__transport__callbacks.html#a5d523402980ac09fdf52aa4824f8e9f7">wickr_transport_callbacks::rx</a></div><div class="ttdeci">wickr_transport_rx_func rx</div><div class="ttdef"><b>Definition:</b> transport_ctx.h:100</div></div>
<div class="ttc" id="group__wickr__transport__ctx_html_ga338125913ff273beec721b341de639a3"><div class="ttname"><a href="group__wickr__transport__ctx.html#ga338125913ff273beec721b341de639a3">wickr_transport_ctx_set_data_flow_mode</a></div><div class="ttdeci">void wickr_transport_ctx_set_data_flow_mode(wickr_transport_ctx_t *ctx, wickr_transport_data_flow flow_mode)</div></div>
<div class="ttc" id="group__wickr__transport__ctx_html_gabd4c671c3f420e804dae16c662bc71c7"><div class="ttname"><a href="group__wickr__transport__ctx.html#gabd4c671c3f420e804dae16c662bc71c7">wickr_transport_ctx_get_user_psk</a></div><div class="ttdeci">const wickr_buffer_t * wickr_transport_ctx_get_user_psk(const wickr_transport_ctx_t *ctx)</div></div>
<div class="ttc" id="structwickr__buffer_html"><div class="ttname"><a href="structwickr__buffer.html">wickr_buffer</a></div><div class="ttdoc">Represents an array of bytes and the length of the allocation associated with those bytes.</div><div class="ttdef"><b>Definition:</b> buffer.h:51</div></div>
<div class="ttc" id="group__wickr__transport__ctx_html_gad9baf62b25d23b9c6ecd5cec0fc9d6f5"><div class="ttname"><a href="group__wickr__transport__ctx.html#gad9baf62b25d23b9c6ecd5cec0fc9d6f5">wickr_transport_ctx_get_remote_node_ptr</a></div><div class="ttdeci">const wickr_node_t * wickr_transport_ctx_get_remote_node_ptr(const wickr_transport_ctx_t *ctx)</div></div>
<div class="ttc" id="structwickr__stream__ctx_html"><div class="ttname"><a href="structwickr__stream__ctx.html">wickr_stream_ctx</a></div><div class="ttdoc">A context that is used for encrypting or decrypting a sequenced stream of data packets The stream con...</div><div class="ttdef"><b>Definition:</b> stream_ctx.h:67</div></div>
<div class="ttc" id="structwickr__node_html"><div class="ttname"><a href="structwickr__node.html">wickr_node</a></div><div class="ttdoc">Represents a message destination at a point in time.</div><div class="ttdef"><b>Definition:</b> node.h:67</div></div>
<div class="ttc" id="structwickr__transport__callbacks_html_af01227bfe19f056de55669d79ed7c120"><div class="ttname"><a href="structwickr__transport__callbacks.html#af01227bfe19f056de55669d79ed7c120">wickr_transport_callbacks::on_psk_required</a></div><div class="ttdeci">wickr_transport_psk_func on_psk_required</div><div class="ttdef"><b>Definition:</b> transport_ctx.h:103</div></div>
<div class="ttc" id="group__wickr__transport__ctx_html_gabe547b01f4f02efea3f518d7445a71ee"><div class="ttname"><a href="group__wickr__transport__ctx.html#gabe547b01f4f02efea3f518d7445a71ee">wickr_transport_ctx_destroy</a></div><div class="ttdeci">void wickr_transport_ctx_destroy(wickr_transport_ctx_t **ctx)</div></div>
<div class="ttc" id="group__wickr__transport__ctx_html_ga3d3ffde9ec2f9f12ecb6999a048e2437"><div class="ttname"><a href="group__wickr__transport__ctx.html#ga3d3ffde9ec2f9f12ecb6999a048e2437">wickr_transport_ctx_get_status</a></div><div class="ttdeci">wickr_transport_status wickr_transport_ctx_get_status(const wickr_transport_ctx_t *ctx)</div></div>
<div class="ttc" id="group__wickr__transport__ctx_html_ga9ed375c418ca58c30ca31c8303c71f92"><div class="ttname"><a href="group__wickr__transport__ctx.html#ga9ed375c418ca58c30ca31c8303c71f92">wickr_transport_ctx_set_callbacks</a></div><div class="ttdeci">void wickr_transport_ctx_set_callbacks(wickr_transport_ctx_t *ctx, const wickr_transport_callbacks_t *callbacks)</div></div>
<div class="ttc" id="group__wickr__transport__ctx_html_gaa49b2cf44bcb02d656598a17e5ae1c52"><div class="ttname"><a href="group__wickr__transport__ctx.html#gaa49b2cf44bcb02d656598a17e5ae1c52">wickr_transport_ctx_copy</a></div><div class="ttdeci">wickr_transport_ctx_t * wickr_transport_ctx_copy(const wickr_transport_ctx_t *ctx)</div></div>
<div class="ttc" id="group__wickr__transport__ctx_html_gaea14ff3de739f7bf4f85516fdefd1ea9"><div class="ttname"><a href="group__wickr__transport__ctx.html#gaea14ff3de739f7bf4f85516fdefd1ea9">wickr_transport_ctx_get_user_ctx</a></div><div class="ttdeci">const void * wickr_transport_ctx_get_user_ctx(const wickr_transport_ctx_t *ctx)</div></div>
<div class="ttc" id="structwickr__transport__callbacks_html_a1b6ee026d404a5b267e0c680dc9c2337"><div class="ttname"><a href="structwickr__transport__callbacks.html#a1b6ee026d404a5b267e0c680dc9c2337">wickr_transport_callbacks::on_tx_stream_gen</a></div><div class="ttdeci">wickr_transport_tx_stream_func on_tx_stream_gen</div><div class="ttdef"><b>Definition:</b> transport_ctx.h:104</div></div>
<div class="ttc" id="group__wickr__transport__ctx_html_ga4731758cf20b71d4469c74904bf662c0"><div class="ttname"><a href="group__wickr__transport__ctx.html#ga4731758cf20b71d4469c74904bf662c0">wickr_transport_ctx_create</a></div><div class="ttdeci">wickr_transport_ctx_t * wickr_transport_ctx_create(const wickr_crypto_engine_t engine, wickr_node_t *local_identity, wickr_node_t *remote_identity, uint32_t evo_count, wickr_transport_callbacks_t callbacks, void *user)</div></div>
<div class="ttc" id="group__wickr__transport__ctx_html_gaffad367319e17f62046cde388ccd8802"><div class="ttname"><a href="group__wickr__transport__ctx.html#gaffad367319e17f62046cde388ccd8802">wickr_transport_ctx_get_data_flow_mode</a></div><div class="ttdeci">wickr_transport_data_flow wickr_transport_ctx_get_data_flow_mode(const wickr_transport_ctx_t *ctx)</div></div>
<div class="ttc" id="group__wickr__transport__ctx_html_ga60dad2360ba29d8c131093a4e9b69057"><div class="ttname"><a href="group__wickr__transport__ctx.html#ga60dad2360ba29d8c131093a4e9b69057">wickr_transport_ctx_process_tx_buffer</a></div><div class="ttdeci">wickr_buffer_t * wickr_transport_ctx_process_tx_buffer(wickr_transport_ctx_t *ctx, const wickr_buffer_t *buffer)</div></div>
<div class="ttc" id="structwickr__transport__callbacks_html_afef0716506b88885c57fda652500b3da"><div class="ttname"><a href="structwickr__transport__callbacks.html#afef0716506b88885c57fda652500b3da">wickr_transport_callbacks::on_state</a></div><div class="ttdeci">wickr_transport_state_change_func on_state</div><div class="ttdef"><b>Definition:</b> transport_ctx.h:101</div></div>
<div class="ttc" id="structwickr__transport__ctx_html"><div class="ttname"><a href="structwickr__transport__ctx.html">wickr_transport_ctx</a></div><div class="ttdoc">Transport context to manage the state machine of a point to point connection using fundamentals of th...</div></div>
<div class="ttc" id="group__wickr__transport__ctx_html_gac1865750950d6ff5ba3850c5f03ab3c9"><div class="ttname"><a href="group__wickr__transport__ctx.html#gac1865750950d6ff5ba3850c5f03ab3c9">wickr_transport_ctx_set_user_ctx</a></div><div class="ttdeci">void wickr_transport_ctx_set_user_ctx(wickr_transport_ctx_t *ctx, void *user)</div></div>
<div class="ttc" id="group__wickr__transport__ctx_html_gaa0af661e209143c19633e1244ac59db4"><div class="ttname"><a href="group__wickr__transport__ctx.html#gaa0af661e209143c19633e1244ac59db4">wickr_transport_ctx_process_rx_buffer</a></div><div class="ttdeci">wickr_buffer_t * wickr_transport_ctx_process_rx_buffer(wickr_transport_ctx_t *ctx, const wickr_buffer_t *buffer)</div></div>
<div class="ttc" id="group__wickr__transport__ctx_html_gaee74761e31d5f0a6fc97e2ccf5ac1e29"><div class="ttname"><a href="group__wickr__transport__ctx.html#gaee74761e31d5f0a6fc97e2ccf5ac1e29">wickr_transport_ctx_start</a></div><div class="ttdeci">void wickr_transport_ctx_start(wickr_transport_ctx_t *ctx)</div></div>
<div class="ttc" id="structwickr__identity__chain_html"><div class="ttname"><a href="structwickr__identity__chain.html">wickr_identity_chain</a></div><div class="ttdoc">Represents a root -&gt; node relationship as well as it's signature status.</div><div class="ttdef"><b>Definition:</b> identity.h:110</div></div>
<div class="ttc" id="structwickr__crypto__engine_html"><div class="ttname"><a href="structwickr__crypto__engine.html">wickr_crypto_engine</a></div><div class="ttdoc">Interface to a set of cryptographic operations used throughout the library. Currently the default imp...</div><div class="ttdef"><b>Definition:</b> crypto_engine.h:53</div></div>
<div class="ttc" id="group__wickr__transport__ctx_html_gafc6235ed4ee84ccbdfc3a0a0a617b557"><div class="ttname"><a href="group__wickr__transport__ctx.html#gafc6235ed4ee84ccbdfc3a0a0a617b557">wickr_transport_ctx_get_callbacks</a></div><div class="ttdeci">const wickr_transport_callbacks_t * wickr_transport_ctx_get_callbacks(const wickr_transport_ctx_t *ctx)</div></div>
<div class="ttc" id="group__wickr__transport__ctx_html_ga3ec320d2e4a4010ffa3f411c1ea1419a"><div class="ttname"><a href="group__wickr__transport__ctx.html#ga3ec320d2e4a4010ffa3f411c1ea1419a">wickr_transport_ctx_get_rxstream_user_data</a></div><div class="ttdeci">const wickr_buffer_t * wickr_transport_ctx_get_rxstream_user_data(const wickr_transport_ctx_t *ctx)</div></div>
<div class="ttc" id="structwickr__transport__callbacks_html_a06c4b21b847c00e92373cf1402e1cb9d"><div class="ttname"><a href="structwickr__transport__callbacks.html#a06c4b21b847c00e92373cf1402e1cb9d">wickr_transport_callbacks::tx</a></div><div class="ttdeci">wickr_transport_tx_func tx</div><div class="ttdef"><b>Definition:</b> transport_ctx.h:99</div></div>
<div class="ttc" id="structwickr__transport__callbacks_html"><div class="ttname"><a href="structwickr__transport__callbacks.html">wickr_transport_callbacks</a></div><div class="ttdoc">callbacks to notify the user of events within the transport</div><div class="ttdef"><b>Definition:</b> transport_ctx.h:98</div></div>
<div class="ttc" id="group__wickr__transport__ctx_html_ga7bcb60a2739744e08cce0c18ce7f01ba"><div class="ttname"><a href="group__wickr__transport__ctx.html#ga7bcb60a2739744e08cce0c18ce7f01ba">wickr_transport_ctx_get_local_node_ptr</a></div><div class="ttdeci">const wickr_node_t * wickr_transport_ctx_get_local_node_ptr(const wickr_transport_ctx_t *ctx)</div></div>
<div class="ttc" id="group__wickr__transport__ctx_html_ga177b8b150fe250cf04f8350be94af7fa"><div class="ttname"><a href="group__wickr__transport__ctx.html#ga177b8b150fe250cf04f8350be94af7fa">wickr_transport_ctx_force_tx_key_evo</a></div><div class="ttdeci">bool wickr_transport_ctx_force_tx_key_evo(wickr_transport_ctx_t *ctx)</div></div>
<div class="ttc" id="structwickr__transport__callbacks_html_ab1afc16797b1bb30dde87936a97f682e"><div class="ttname"><a href="structwickr__transport__callbacks.html#ab1afc16797b1bb30dde87936a97f682e">wickr_transport_callbacks::on_identity_verify</a></div><div class="ttdeci">wickr_transport_validate_identity_func on_identity_verify</div><div class="ttdef"><b>Definition:</b> transport_ctx.h:102</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
